﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Engine.Result
{
    public class ChipResult : ICloneable
    {
        public DUTPoint Id { get; set; }
        public List<List<ItemResult>> _itemResults = new List<List<ItemResult>>();

        public long CycleTime { get; set; }
        public DUTPoint Chip { get; set; }


        public ChipResult()
        {

        }
        public ItemResult GetItemResult(int st, int index) => _itemResults[st][index];


        public Point ToPoint()
        {
            return new Point(X, Y);
        }

        public int X => Id.X;
        public int Y => Id.Y;

        public object Clone()
        {
            var value = new ChipResult();
            value.Id = Id;
            value.CycleTime = CycleTime;
            value.Chip = Chip;
            value._itemResults = _itemResults;

            return value;
            //return this.MemberwiseClone();
        }

        public override string ToString()
        {
            return $"X:{X}Y:{Y}";
        }
    }



}
